package com.dragon.backstage.controller;

import com.dragon.common.annotation.AuthPermission;
import com.dragon.common.utils.AjaxResult;
import com.dragon.framework.domain.Server;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控控制器
 *
 * @author dragon
 * @version 1.0
 * @date 2024/10/28 10:59
 */
@RestController
@RequestMapping("/api/monitor/server")
@Tag(name = "服务器监控模块接口")
public class ServerController {

    /**
     * 在线用户列表
     */
    @GetMapping("/info")
    @Operation(summary = "服务器监控信息")
    @AuthPermission(value = "monitor.server.info")
    public AjaxResult<Server> list() throws Exception {
        Server server = new Server();
        server.copyTo();
        return AjaxResult.succeedWith(server);
    }

}
